<?php
class GoodsModel extends Model
{
	static public function getInstance()
	{
		static $_obj = null;
		if($_obj == null){
			$_obj = M('Goods');
		}
		return $_obj;
	}

	static public function getGoodsList($page, $page_size, $options = array(), $order = array())
	{
		return self::getInstance()->where($options)->limit($page, $page_size)->order($order)->select();
	}

	static public function getCount($options= array())
	{
		return self::getInstance()->where($options)->count();
	}

}